<%--
  Created by IntelliJ IDEA.
  User: WYX
  Date: 2024/3/20
  Time: 16:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>day01.jsp</title>
</head>
<body>
<% for (int i = 2; i < 10000; i++) {
    int k = (int) Math.sqrt(i);
    boolean flag = true;
    for (int j = 2; j <= k; j++)
        if (i % j == 0) {
            flag = false;
            break;
        }
    if (flag)
        out.println("素数：" + i + "<br>");

}%>
</body>
</html>
